package com.gupaoedu.pattern.template;

/**
 * 2019/9/28
 * created by chenpp
 * 需求开发
 */
public abstract class RequirementDevelop {

    /**
     * 需求名称
     * */
    private String requirementName;

    protected void develop(){
        if(needPrepare()){
            //1.准备工作 (可能包括需求评审,视觉稿等)
            this.prepare();
        }
        //2.开发
        this.techDevelop();
        //3.测试
        this.test();
        //4.上线
        this.deploy();



    }

    protected boolean needPrepare(){
        return false;
    }

    protected abstract  void prepare();

    private void deploy(){
        System.out.println("需求开发测试完成，可以上线...");
    }

    private void test(){
        System.out.println("对需求进行测试验证..");
    }

    private  void techDevelop(){
        System.out.println("对需求进行开发..");
    }

    protected void requirementReview() {
        System.out.println("对需求进行评审..");
    }
}
